#ifndef OTATHREAD_H
#define OTATHREAD_H

#include <QCoreApplication>
#include <QThread>
#include <QDebug>
#include "ymodem.h"
#include <QMessageBox>

class OTAThread : public QThread
{
    Q_OBJECT
public:
    void run() override;
    void stop();

private:
    bool m_stopFlag = false;
    QString OTAfilePath;
    QString OTASerialPort;

    QSerialPort *serial; //串口类

public slots:
    void handleMessage(const QString& filePath , const QString& SerialPort);
};

#endif // OTATHREAD_H
